if __name__ == '__main__':
    maps = """
    +-------------------------------------------------+
    |                                                 |
    |    H######                      ####            |
    |          #                      #  #            |
    |          #                      #  #            |
    |          #     ####             #  #            |
    |          #     #  #             #  #            |
    |          ######@###             #  #            |
    |                #       ####     #  #            |
    |                #       #  #     #  #            |
    |            ####@#######@###     #  #            |
    |            #   #       #        #  #            |
    | T          #####       #        #  #   ##       |
    | #                      #      ###  ### ##       |
    | ################       #      #      ####       |
    |                #       #      #         #       |
    |   ##############       #######@##########       |
    |   #                         ###                 |
    |   ###########################                   |
    +-------------------------------------------------+
    """
    ans = 0
    for line in maps.split("\n"):
        for ch in line:
            if ch == "#":
                ans += 1
            elif ch == "@":
                ans += 2
    print(ans + 2)
